# Maintainer: Alexey Pavlov <alexpux@gmail.com>

_realname=Convert-BinHex
pkgname="perl-${_realname}"
pkgver=1.125
pkgrel=1
pkgdesc="Perl module to extract data from Macintosh BinHex files"
arch=('any')
url="https://metacpan.org/release/Convert-BinHex"
license=('PerlArtistic')
depends=('perl')
options=('!emptydirs')
install=${pkgname}.install
source=("https://www.cpan.org/authors/id/S/ST/STEPHEN/${_realname}-$pkgver.tar.gz")
sha256sums=('513591b4be46bd7eb91e83197721b4a045a9753a3dd2f11de82c9d3013226397')

build() {
  cd "${srcdir}/${_realname}-${pkgver}"

  # install module in vendor directories.
  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
  make
}

package() {
  cd "${srcdir}/${_realname}-${pkgver}"
  make DESTDIR="${pkgdir}" install
}
